import { createApp } from 'vue'
import { createPinia } from 'pinia'

// 1. 引入 Element Plus 组件库
import ElementPlus from 'element-plus' // [!code ++]

import App from './App.vue'
import router from './router'
//导入element-plus的全局样式
import 'element-plus/dist/index.css'
//导入pinia持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'


//创建pinia实例
const pinia = createPinia()
//将持久化插件注册pinia
pinia.use(piniaPluginPersistedstate)


const app = createApp(App)

app.use(pinia)
//app.use(createPinia())
app.use(router)
app.use(ElementPlus) // [!code ++] // 3. 注册 Element Plus

app.mount('#app')
